package ar.com.gep.soccer.services.dto;

import java.util.List;

import ar.com.cdt.framework.business.dto.BaseDTO;

public class EditionDTO extends BaseDTO {

	private static final long serialVersionUID = 4229499963506532640L;

	private int number;

	private int numberOfRounds;

	private List<RoundDTO> rounds;

	private int totalOfRounds;

	private List<PositionDTO> positions;

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public int getNumberOfRounds() {
		return numberOfRounds;
	}

	public void setNumberOfRounds(int numberOfRounds) {
		this.numberOfRounds = numberOfRounds;
	}

	public List<RoundDTO> getRounds() {
		return rounds;
	}

	public void setRounds(List<RoundDTO> rounds) {
		this.rounds = rounds;
	}

	public List<PositionDTO> getPositions() {
		return positions;
	}

	public void setPositions(List<PositionDTO> positions) {
		this.positions = positions;
	}

	public int getTotalOfRounds() {
		return totalOfRounds;
	}

	public void setTotalOfRounds(int totalOfRounds) {
		this.totalOfRounds = totalOfRounds;
	}

	public RoundDTO getPlayRound() {
		return getRounds().get(getNumberOfRounds());
	}

	public void incrementRound() {
		setNumberOfRounds(getNumberOfRounds() + 1);
	}

	public void calculatePositions() {
		RoundDTO roundDTO = getRounds().get(getNumberOfRounds());
		roundDTO.calculatePosition(getPositions());
	}

}
